import 'dart:convert';

QuestionEntity questionEntityFromJson(String str) => QuestionEntity.fromJson(json.decode(str));

String questionEntityToJson(QuestionEntity data) => json.encode(data.toJson());

class QuestionEntity {
  String mtInquiryTitle;
  String mtInquiryContent;
  List<MtInquiry> mtInquiry;

  QuestionEntity({
    required this.mtInquiryTitle,
    required this.mtInquiryContent,
    required this.mtInquiry,
  });

  factory QuestionEntity.fromJson(Map<String, dynamic> json) => QuestionEntity(
    mtInquiryTitle: json["mt_inquiry_title"],
    mtInquiryContent: json["mt_inquiry_content"],
    mtInquiry: List<MtInquiry>.from(json["mt_inquiry"].map((x) => MtInquiry.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "mt_inquiry_title": mtInquiryTitle,
    "mt_inquiry_content": mtInquiryContent,
    "mt_inquiry": List<dynamic>.from(mtInquiry.map((x) => x.toJson())),
  };
}

class MtInquiry {
  String title;
  List<String> option;

  MtInquiry({
    required this.title,
    required this.option,
  });

  factory MtInquiry.fromJson(Map<String, dynamic> json) => MtInquiry(
    title: json["title"],
    option: List<String>.from(json["option"].map((x) => x)),
  );

  Map<String, dynamic> toJson() => {
    "title": title,
    "option": List<dynamic>.from(option.map((x) => x)),
  };
}
